#-*- codeing = utf-8 -*-
#@Time : 2020/8/28 19:05
#@Author : 阳某
#@File : 1.py
#@Software : PyCharm


import requests
import re

url = 'http://stock.finance.sina.com.cn/stock/go.php/vReport_Show/kind/lastest/rptid/651843781039/index.phtml'
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'
}
response = requests.get(url,headers = headers)
print(response.status_code)
#print(response.text)
text = response.text
text = re.findall('</head>(.*)',text,re.S)[0]
text = re.sub('<script>(.*?)</script>','',text)
text = re.sub('<.*?>','',text)
print(text)